[. . . ] = null) { if (typeof(response) == "number") { // error or user-cancel, time to close the window // and let the user know we got an error window. 0 or later to use this ¬ command"); return; } // Tell Fireworks to execute the prompt() method. ExecJsInFireworks¬ ("prompt('Please enter your name:')"); // null means it wasn't launched, a number means an error code RÉFÉRENCE DES API DE DVY1010B 40 Intégration de Fireworks if (gProgressTrackerCookie == null || ¬ typeof(gProgressTrackerCookie) == "number") { window. Close(); alert("an error occurred"); gProgressTrackerCookie = null; } else { // bring Fireworks to the front FWLaunch. [. . . ] BringFWToFront(); // start the checking to see if Fireworks is done yet checkOneMoreTime(); } } function checkOneMoreTime() { // Call checkJsResponse() every 1/2 second to see if Fireworks // is done yet window. SetTimeout("checkJsResponse();", 500); } function checkJsResponse() { var response = null; // The user clicked the cancel button, close the window if (gCancelClicked) { window. Close(); alert("cancel clicked"); } else { // We're still going, ask Fireworks how it's doing if (gProgressTrackerCookie !GetJsResponse(gProgressTrackerCookie); if (response == null) { // still waiting for a response, call us again in 1/2 a // second checkOneMoreTime(); } else if (typeof(response) == "number") { // if the response was a number, it means an error occurred // the user cancelled in Fireworks window. This return value might not // always be a useful one, since not all functions in // Fireworks return a string, but we know this one does, // so we can show the user what we got. BringDWToFront();// bring Dreamweaver to the front RÉFÉRENCE DES API DE DVY1010B 41 Intégration de Fireworks alert("Nice to meet you, " + response + "!"); } } } </script> </head> <body> <form> <table width="313" nowrap> <tr> <td>This command asks Fireworks to execute the prompt() ¬ function. When you click Prompt, Fireworks comes forward and ¬ asks you to enter a value into a dialog box. That value is then ¬ returned to Dreamweaver and displayed in an alert. GetBlockElements(); var hasLayout = false; // loop through the block-level children to see if // any have width or height defined. Width or height on any // of the children of the outer block will prevent the bug. GetInlineElements(); var next = null, prev = null, parent = null; var props = null; // look through all inline elements for replaced elements. // if no replaced elements are found, don't bother going forward. GetDocumentDOM(); // get all the UL, OL, and DL elements in the document. Length; i++){ // next is the node right after blocks[i] next = blocks[i]. NextSibling; // if next isn't null AND next is an element node AND next is a block element, // we've met the "second of two consecutive block elements" test. Body); var prev = null; // first float in the document isn't affected, so start // at 1. PreviousSibling; // if the element before the float is a header if (prev && prev. [. . . ] Body); var prev = null; // first float in the document isn't affected, so start // at 1. PreviousSibling; // if the element before the float is a header if (prev && prev. ApplyLayout(1, "embed"); else alert("can't apply layout to this doc"); dom. RÉFÉRENCE DES API DE DVY1010B 379 Création Arguments left, top, bottom, right. [. . . ]